
package com.qdu.dao;

import com.qdu.util.DatabaseUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Lenovo
 */
public class GetAllManagerDao {
    
    
    	public List getAllManager(){
                  Connection con = null;
                  PreparedStatement ps = null;
                  ResultSet rs = null;
                  List list = new ArrayList();

		try{
                     con = DatabaseUtil.getConnection();
                     ps = con.prepareStatement("select * from systemadministrator");
                     rs = ps.executeQuery();
			while(rs.next()){
				List list2=new ArrayList();
				list2.add(rs.getString(1));
				list2.add(rs.getString(2));
				list2.add(rs.getString(4));
				list.add(list2);
			}
			return list;
		}catch(Exception e){
                     e.printStackTrace();
                        return list;
		}finally{
			DatabaseUtil.close(rs, ps, con);
		}
	}
        
        
}
